<?php if (!defined('BASEPATH')) exit('No direct script access allowed');

/**
 * Adminlog Controller
 * Build by Phuc Nguyen
 * Contact : nguyenvanphuc0626@gmail.com
 */

class Voicelog_model extends MY_Model{
	
	public function __construct(){
		parent::__construct();
		$this->table_name = 'book_voicelog';
	}
        
        public function getTimeCallById($userid,$date){
                $this->db->select('SUM(Thoigiangoi) AS tongcuocgoi,owner');
                $this->db->from($this->table_name);
                $this->db->where('owner',$userid);
                $this->db->like('lastupdated',$date);
                $this->db->group_by('owner');
                $query = $this->db->get();
		return $query->result();
        }
}